package nc.bs.gsp.hf058005;

import java.util.Collection;

import nc.bs.medpub.pub.MedQueryDMO;
import nc.vo.gsp.hf058005.ZLCXDJHeadVO;
import nc.vo.gsp.pub.GspConst;
import nc.vo.jcom.lang.StringUtil;
import nc.vo.pub.BusinessException;
import nc.vo.pub.CircularlyAccessibleValueObject;

public class GspZlcxdjDMO extends MedQueryDMO {

	@Override
	protected String getBillType() {

		return GspConst.ZLCXDJ;
	}
	
	@Override
	protected Class<?> getHeadVOClass() throws BusinessException {
		
		return ZLCXDJHeadVO.class;
	}
	
	@Override
	protected Class<?> getBodyVOClass() throws BusinessException {
		
		return ZLCXDJHeadVO.class;
	}

	public CircularlyAccessibleValueObject[] queryAllHeadData(String whereString) throws BusinessException {
		String strWhere = " nvl(dr,0)=0 ";
		if (!StringUtil.isEmptyWithTrim(whereString)) {
			strWhere += " and (" + whereString + ")";
		}
		Collection rs = getDao().retrieveByClause(ZLCXDJHeadVO.class, strWhere);
		if (rs != null && !rs.isEmpty()) {
			return (ZLCXDJHeadVO[]) rs.toArray(new ZLCXDJHeadVO[0]);
		}
		return null;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key) throws BusinessException {

		return null;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key, String whereString) throws BusinessException {
		
		return null;
	}

}
